<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <meta name="baidu-site-verification" content="code-OyDaGkZ9eq">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":"mac"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":true,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="交换机常用命令笔记(谨记)">
<meta property="og:type" content="article">
<meta property="og:title" content="华为HCNP基本命令">
<meta property="og:url" content="http://example.com/2021/01/02/%E5%B0%8F%E7%94%9F%E5%8D%9A%E5%AE%A2/HCNA/01%E5%8D%8E%E4%B8%BAHCNA%E5%9F%BA%E6%9C%AC%E5%91%BD%E4%BB%A4/index.html">
<meta property="og:site_name" content="极风键客">
<meta property="og:description" content="交换机常用命令笔记(谨记)">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="http://example.com/.com//01.jpg">
<meta property="og:image" content="http://example.com/.com//2.png">
<meta property="og:image" content="http://example.com/.com//3.png">
<meta property="article:published_time" content="2021-01-02T12:46:25.000Z">
<meta property="article:modified_time" content="2021-02-19T09:56:31.233Z">
<meta property="article:author" content="王增明">
<meta property="article:tag" content="华为">
<meta property="article:tag" content="交换机">
<meta property="article:tag" content="网络">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/.com//01.jpg">

<link rel="canonical" href="http://example.com/2021/01/02/%E5%B0%8F%E7%94%9F%E5%8D%9A%E5%AE%A2/HCNA/01%E5%8D%8E%E4%B8%BAHCNA%E5%9F%BA%E6%9C%AC%E5%91%BD%E4%BB%A4/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'en'
  };
</script>

  <title>华为HCNP基本命令 | 极风键客</title>
  


  <script data-pjax>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?b94f963e94e4127fa71ab49cbddce93b";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/atom.xml" title="极风键客" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">极风键客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">技术狂热爱好者!</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-sitemap">

    <a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

  <span class="exturl github-corner" data-url="aHR0cHM6Ly9naXRodWIuY29tL3dhbmd6ZW5nbWluZw==" title="客官,来嘛~" aria-label="客官,来嘛~"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></span>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://example.com/2021/01/02/%E5%B0%8F%E7%94%9F%E5%8D%9A%E5%AE%A2/HCNA/01%E5%8D%8E%E4%B8%BAHCNA%E5%9F%BA%E6%9C%AC%E5%91%BD%E4%BB%A4/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpeg">
      <meta itemprop="name" content="王增明">
      <meta itemprop="description" content="喜欢折腾的极客聚集地.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="极风键客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          华为HCNP基本命令
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-01-02 20:46:25" itemprop="dateCreated datePublished" datetime="2021-01-02T20:46:25+08:00">2021-01-02</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-02-19 17:56:31" itemprop="dateModified" datetime="2021-02-19T17:56:31+08:00">2021-02-19</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E7%BD%91%E7%BB%9C/" itemprop="url" rel="index"><span itemprop="name">网络</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>4.6k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>4 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>交换机常用命令笔记(谨记)</p>
<a id="more"></a>

<blockquote>
<p>思科     cisco   :CCNA CCNP CCIE</p>
<p>华为  huawei  :HCNA HCNP HCIE</p>
</blockquote>
<h1 id="快捷键及简洁操作"><a href="#快捷键及简洁操作" class="headerlink" title="快捷键及简洁操作"></a>快捷键及简洁操作</h1><p>tab补全</p>
<p>?提示</p>
<p>支持简写</p>
<p>more :空格键翻页 其他键退出</p>
<p>ctrl+z:直接回退到用户模式</p>
<p>一直ping:    </p>
<p>ping  XXX.XXX.XXX.XX  -t</p>
<h1 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h1><h2 id="基本命令"><a href="#基本命令" class="headerlink" title="基本命令"></a>基本命令</h2><p>&lt; &gt;用户视图模式</p>
<p>[  ]系统视图模式</p>
<ul>
<li><p>切换到系统视图</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;&gt; system-view </span><br></pre></td></tr></table></figure></li>
<li><p>命名</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[] sysname R1 </span><br></pre></td></tr></table></figure></li>
<li><p>退出当前模式</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[] quit</span><br></pre></td></tr></table></figure></li>
<li><p>提示语言改为中文(只在用户视图模式下生效)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">language-mode Chinese</span><br></pre></td></tr></table></figure></li>
<li><p>显示当前所有配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dis current-configuration</span><br></pre></td></tr></table></figure>
</li>
<li><p>撤销某条指令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">undo XXXXX</span><br></pre></td></tr></table></figure>



</li>
</ul>
<ul>
<li><p>显示接口摘要信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display interface brief </span><br></pre></td></tr></table></figure></li>
<li><p>显示接口信息</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display interface GigabitEthernet 1&#x2F;1&#x2F;4</span><br></pre></td></tr></table></figure>
<p>显示接口应用信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display packet-filter interface GigabitEthernet 1&#x2F;1&#x2F;4</span><br></pre></td></tr></table></figure></li>
<li><p>显示该ip的mac地址</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display arp 10.78.4.1</span><br></pre></td></tr></table></figure></li>
<li><p>查看警告信息</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display alarm urgent</span><br></pre></td></tr></table></figure></li>
<li><p>查看CPU占用率</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display cpu-usage</span><br></pre></td></tr></table></figure></li>
<li><p>查看温度信息</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display environment</span><br></pre></td></tr></table></figure></li>
<li><p>查看内存</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display memory-usage</span><br></pre></td></tr></table></figure></li>
<li><p>查看标签显示</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">back elabel</span><br></pre></td></tr></table></figure></li>
<li><p>显示cpu,风扇,内存等配置信息</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display device</span><br></pre></td></tr></table></figure></li>
<li><p>查看接入pc的mac:</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display mac-address</span><br></pre></td></tr></table></figure></li>
<li><p>显示路由表</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display ip routing-table</span><br></pre></td></tr></table></figure>
<p>  路由器转发数据包的唯一依据,是路由器转发数据包的唯一张”地图”</p>
</li>
<li><p>保存配置</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">save </span><br></pre></td></tr></table></figure></li>
<li><p>关闭日志</p>
  <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">undo info-center enable	</span><br></pre></td></tr></table></figure>
<p>直连路由 :direct route 直接相连的路由,当路由器的接口配制好ip地址并up之后,慧自动创建该路由.路由器默认情况下,只能到达直连的网段.</p>
</li>
</ul>
<p><img src="/.com//01.jpg" alt="01">静态路由的配置</p>
<pre><code>去包路由
                  目标网段            下一跳
R1:ip route-static  172.16.1.0  24 12.1.1.2 
R2:ip route-static  172.16.1.0  24    23.1.1.3 

下一跳:next-hop 下一个传递者,下一个承接者

回包路由
R3:ip route-static  192.168.1.0  24  23.1.1.2
R2:ip route-static  192.168.1.0  24  12.1.1.1
</code></pre>
<p>​    </p>
<p>  路由优先级:(preference) 衡量路由的优先程度,到达同一个目标有两种路由协议,此时有线路由优先选优先级较小的路由协议</p>
<p>  路由优先级范围:0-255</p>
<ul>
<li><p>DHCP报文</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dhcp request </span><br></pre></td></tr></table></figure>
<p>有哟过户发向服务器的广播报文,目的是用来通知其他服务器是否使用服务器分配的ip地址.同事该报文还有续租的作用.</p>
<ul>
<li>dhcp租期: 目的是合理有效的使用ip地址</li>
<li>分配给客户端的ip地址都是有租期的,当到达租期一半的时候,客户端会自动触发续租消息(dhcp request 报文)</li>
</ul>
</li>
<li><p>DHCP高级报文</p>
<ul>
<li>DHCP DECLINE  当客户端发现地址已经被使用时,用来通知服务器</li>
<li>DHCP INFORM 客户端已经有IP地址时,用它来向服务器请求其他的配置参数</li>
<li>DHCP NAK 由服务器发送给客户端,用来表明客户端的地址请求不正确或者租期已经过期</li>
<li>DHCP RELEASE 客户端要释放地址时用来通知服务器</li>
</ul>
<h2 id="接口配置"><a href="#接口配置" class="headerlink" title="接口配置"></a>接口配置</h2></li>
<li><p>进入接口e0/0/0</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">int e0&#x2F;0&#x2F;0</span><br></pre></td></tr></table></figure></li>
<li><p>配置端口地址</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ip address  192.168.1.1 24</span><br></pre></td></tr></table></figure></li>
<li><p>删除配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">undo ip address</span><br></pre></td></tr></table></figure></li>
<li><p>关闭接口</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">shudown</span><br></pre></td></tr></table></figure></li>
<li><p>开启接口</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">undo shutdown</span><br></pre></td></tr></table></figure>


</li>
</ul>
<ul>
<li><p>查看某一接口配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display this</span><br></pre></td></tr></table></figure></li>
<li><p>显示当前配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display current-configration</span><br></pre></td></tr></table></figure>
<h2 id="VLAN配置"><a href="#VLAN配置" class="headerlink" title="VLAN配置"></a>VLAN配置</h2></li>
</ul>
<ul>
<li><p>查看 vlan状态</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">display vlan</span><br><span class="line">display vlan 20</span><br></pre></td></tr></table></figure>

<p>创建vlan </p>
<ul>
<li><p>创建vlan 1-100这100个vlan</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vlan batch 1 to 100</span><br></pre></td></tr></table></figure>
</li>
<li><p>创建vlan 1和vlan100这两个vlan</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vlan batch 1 100</span><br></pre></td></tr></table></figure></li>
<li><p>进入vlan10,并将此ip设置为vlan10的网关</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">vlan 10 </span><br><span class="line">ip add 192.168.20.1 24</span><br></pre></td></tr></table></figure></li>
</ul>
</li>
<li><p>vlan设置</p>
<ul>
<li>输入VLAN+号码(各单位VLAN号,从801到830)</li>
<li>PORT+交换机口号</li>
</ul>
</li>
<li><p>把端口1-5放入VLAN20中</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">port e1&#x2F;0&#x2F;1 to e1&#x2F;0&#x2F;5 </span><br></pre></td></tr></table></figure></li>
<li><p>把当前端口放入vlan20</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">port access vlan  20</span><br></pre></td></tr></table></figure></li>
<li><p>删除当前VLan端口10</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">undo port e1&#x2F;0&#x2F;10</span><br></pre></td></tr></table></figure>
</li>
<li><p>应用相应的vlan到该端口上。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">interface Ethernet x&#x2F;x&#x2F;x </span><br><span class="line">port default vlan x</span><br></pre></td></tr></table></figure>
</li>
<li><p>指定端口类型</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">port link-type access&#x2F;trunk</span><br></pre></td></tr></table></figure>
<ul>
<li>Access类型bai的端口只能du于1个zhiVLAN,一般用于连接计dao算机的端口。zhuan</li>
<li>Trunk类型的端口可以shu允许属多个VLAN通过，可以接收和发送多个VLAN的报文，一般用于交换机之间连接的端口。</li>
</ul>
</li>
<li><p>端口的trunk 允许 带有vlan标签10 20的数据帧通过。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">port trunk allow-pass vlan 10 20</span><br></pre></td></tr></table></figure>



</li>
</ul>
<h2 id="DHCP-配置使用"><a href="#DHCP-配置使用" class="headerlink" title="DHCP 配置使用"></a>DHCP 配置使用</h2><h3 id="方法一-全局建立地址池"><a href="#方法一-全局建立地址池" class="headerlink" title="方法一 全局建立地址池"></a>方法一 全局建立地址池</h3><ul>
<li><p>开启DHCP</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dhcp enabled</span><br></pre></td></tr></table></figure></li>
<li><p>创建ip池,创建ip</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">ip pool &#96;name&#96;</span><br><span class="line">network 192.168.1.0 mask 24</span><br><span class="line">gateway-list 192.168.1.1</span><br><span class="line">dns-list 8.8.8.8</span><br></pre></td></tr></table></figure></li>
<li><p>开启dhcp选择功能</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">dhcp select global</span><br><span class="line">dhcp select interface</span><br><span class="line">dhcp select relay</span><br></pre></td></tr></table></figure></li>
<li><p>拓展: </p>
<ul>
<li><p>设置租期(进入地址池中,一般情况不用改)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">lease day 0 hour 23 </span><br><span class="line">lease unlimited</span><br></pre></td></tr></table></figure></li>
<li><p>设置固定ip地址(将ip地址与mac地址绑定)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">static-bind ip-address 192.168.1.200 mac-address XXXX-XXXX-XXXX</span><br></pre></td></tr></table></figure>
<p>mac地址如果已经存在地址池中,则无法进行绑定,需要先进行释放,再绑定</p>
</li>
<li><p>排除地址段     从地址池中拿出一部分,不能随机分配(例如1-200可以进行分配,201-254不能进行分配)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">excluded-ip-address 192.168.1.201 192.168.1.254</span><br></pre></td></tr></table></figure></li>
<li><p>重置分配记录 (用户模式下)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">reset ip pool name XXXX used</span><br></pre></td></tr></table></figure></li>
<li><p>显示地址池</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display ip pool</span><br></pre></td></tr></table></figure></li>
<li><p>显示地址池详细信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display ip pool name  XXX used</span><br></pre></td></tr></table></figure>


</li>
</ul>
</li>
</ul>
<h3 id="方法二-基于接口的DHCP-简单-便捷"><a href="#方法二-基于接口的DHCP-简单-便捷" class="headerlink" title="方法二  基于接口的DHCP(简单,便捷)"></a>方法二  基于接口的DHCP(简单,便捷)</h3><p>dhcp分配的网段跟此接口所在的网段一样,网关就是此接口的ip地址</p>
<ul>
<li><p>不需要地址池(只需一条指令)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dhcp select interface</span><br></pre></td></tr></table></figure></li>
<li><p>dns配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">dhcp server ?</span><br><span class="line">dhcp server dns-list 8.8.8.8</span><br></pre></td></tr></table></figure>


</li>
</ul>
<h3 id="方法三-DHCP-relay-dhcp中继"><a href="#方法三-DHCP-relay-dhcp中继" class="headerlink" title="方法三 DHCP relay (dhcp中继)"></a>方法三 DHCP relay (dhcp中继)</h3><ul>
<li><p>交换机配置好vlan和trunk</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">port link-type access</span><br><span class="line">port default vlan 20</span><br><span class="line">---</span><br><span class="line">port link-type trunk</span><br><span class="line">port trunk allow-pass vlan 20 </span><br></pre></td></tr></table></figure>
<h2 id="DHCP-SNOOPING"><a href="#DHCP-SNOOPING" class="headerlink" title="DHCP SNOOPING"></a>DHCP SNOOPING</h2></li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">dhcp enable </span><br><span class="line">dhcp snooping enable</span><br><span class="line">dhcp snooping enable vlan 10</span><br><span class="line">int e0&#x2F;0&#x2F;3 </span><br><span class="line">dhcp snooping trusted</span><br></pre></td></tr></table></figure>
<h2 id="BFD"><a href="#BFD" class="headerlink" title="BFD"></a>BFD</h2><p>双向转发检查作用,毫秒级故障检查,通常结合三层协议(如静态路由,vrrp,ospf,BGP等)实现链路故障快速检查.     </p>
 <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">bfd 1 bind peer-ip 12.1.1.2 source-ip 12.1.1.1 配置组1</span><br><span class="line">discriminatory local 1 本地标识1 标识需要互为对称</span><br><span class="line">discriminatory remote 2 远程标识2 </span><br><span class="line">commit 确认提交</span><br></pre></td></tr></table></figure>
<p>静态路由调用BFD</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ip route-static 0.0.0.0 0.0.0.0 23.1.1.2 track bfd-session 1</span><br></pre></td></tr></table></figure>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">bfd</span><br><span class="line">ospf 1</span><br><span class="line">bfd all-interfaces enable</span><br></pre></td></tr></table></figure>
<h2 id="端口安全"><a href="#端口安全" class="headerlink" title="端口安全"></a>端口安全</h2><ul>
<li><p>开启端口安全(该接口只能有一个mac地址接入)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">int Gi 0&#x2F;0&#x2F;3</span><br><span class="line">  port-security enable</span><br><span class="line">  port-security aging-time              </span><br><span class="line">  port-security mac-address     </span><br><span class="line">  port-security max-mac-num     </span><br><span class="line">  port-security protect-action  </span><br></pre></td></tr></table></figure>


</li>
</ul>
<h2 id="端口镜像"><a href="#端口镜像" class="headerlink" title="端口镜像"></a>端口镜像</h2><ol>
<li>管理员维护查看网络流量</li>
<li>用开配合IDS,堡垒机等安全设备使用</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">observer-port 1 interface GigabitEthernet 0&#x2F;0&#x2F;2</span><br><span class="line">int gi 0&#x2F;0&#x2F;1</span><br><span class="line">port-mirroring to observe-port 1 </span><br><span class="line">								  both         &#x2F;&#x2F;所有</span><br><span class="line">								  inbound      &#x2F;&#x2F;进</span><br><span class="line">								  outbound     &#x2F;&#x2F;出</span><br></pre></td></tr></table></figure>
<p>1为观察组</p>
<h2 id="vlan高级配置"><a href="#vlan高级配置" class="headerlink" title="vlan高级配置"></a>vlan高级配置</h2><h3 id="根据mac地址划分vlan"><a href="#根据mac地址划分vlan" class="headerlink" title="根据mac地址划分vlan"></a>根据mac地址划分vlan</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">vlan bath 10 20</span><br><span class="line">vlan 10</span><br><span class="line">mac-vlan mac-address 0000-0000-0001</span><br><span class="line">vlan 20</span><br><span class="line">mac-vlan mac-address 0000-0000-0002</span><br></pre></td></tr></table></figure>


<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">int gi0&#x2F;0&#x2F;1</span><br><span class="line">port hybrid untagged vlan 10 20</span><br></pre></td></tr></table></figure>
<p>启用基于mac学习vlan的功能</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mac-vlan enable</span><br></pre></td></tr></table></figure>


<h3 id="根据ip地址划分vlan"><a href="#根据ip地址划分vlan" class="headerlink" title="根据ip地址划分vlan"></a>根据ip地址划分vlan</h3><p><img src="/.com//2.png" alt="2"></p>
<p>1.当检测ip在192.168.10.0/24 的时候,pc接入交换机时,将其划分为vlan 10,且可以好vlan 10的服务器通信</p>
<p>2.当检测ip在192.168.20.0/24 的时候,pc接入交换机时,将其划分为vlan 10,且可以好vlan 20的服务器通信</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">sysname sw2</span><br><span class="line">un in en</span><br><span class="line">vlan batch 10 20 </span><br><span class="line">int gi 0&#x2F;0&#x2F;2</span><br><span class="line">port link-type access</span><br><span class="line">port default vlan 10</span><br><span class="line">int gi 0&#x2F;0&#x2F;3</span><br><span class="line">port link-type access</span><br><span class="line">port default vlan 20</span><br><span class="line">int gi 0&#x2F;0&#x2F;1</span><br><span class="line">port link-type trunk</span><br><span class="line">port trunk allow-pass vlan 10 20</span><br></pre></td></tr></table></figure>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">sysname sw1</span><br><span class="line">un in en</span><br><span class="line">int gi 0&#x2F;0&#x2F;2</span><br><span class="line">port link-type trunk</span><br><span class="line">port trunk allow-pass vlan 10 20</span><br><span class="line">int gi0&#x2F;0&#x2F;1</span><br><span class="line">port hybrid untagged vlan 10 20</span><br><span class="line">ip-subnet-vlan enable </span><br><span class="line"></span><br><span class="line">vlan batch 10 20 </span><br><span class="line">vlan 10 </span><br><span class="line">ip-subnet-vlan ip 192.168.10.0</span><br><span class="line">vlan 20</span><br><span class="line">ip-subnet-vlan ip 192.168.20.0 </span><br></pre></td></tr></table></figure>
<ul>
<li><p>显示vlan ip地址</p>
</li>
<li><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">display ip-subnet-vlan vlan all</span><br></pre></td></tr></table></figure>


</li>
</ul>
<h3 id="super-vlan"><a href="#super-vlan" class="headerlink" title="super vlan"></a>super vlan</h3><p><img src="/.com//3.png" alt="3"></p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%8D%8E%E4%B8%BA/" rel="tag"># 华为</a>
              <a href="/tags/%E4%BA%A4%E6%8D%A2%E6%9C%BA/" rel="tag"># 交换机</a>
              <a href="/tags/%E7%BD%91%E7%BB%9C/" rel="tag"># 网络</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/01/02/%E5%B0%8F%E7%94%9F%E5%8D%9A%E5%AE%A2/linux/02_SHELL%E7%BC%96%E7%A8%8B%E4%B9%8B%E5%8F%98%E9%87%8F%E5%AE%9A%E4%B9%89/" rel="prev" title="02_SHELL编程之变量定义">
      <i class="fa fa-chevron-left"></i> 02_SHELL编程之变量定义
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/01/03/%E5%B0%8F%E7%94%9F%E5%8D%9A%E5%AE%A2/java/Spring%20Boot%E7%AC%94%E8%AE%B0/" rel="next" title="springboot入门">
      springboot入门 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%8F%8A%E7%AE%80%E6%B4%81%E6%93%8D%E4%BD%9C"><span class="nav-number">1.</span> <span class="nav-text">快捷键及简洁操作</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4"><span class="nav-number">2.</span> <span class="nav-text">常用命令</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9F%BA%E6%9C%AC%E5%91%BD%E4%BB%A4"><span class="nav-number">2.1.</span> <span class="nav-text">基本命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%8E%A5%E5%8F%A3%E9%85%8D%E7%BD%AE"><span class="nav-number">2.2.</span> <span class="nav-text">接口配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VLAN%E9%85%8D%E7%BD%AE"><span class="nav-number">2.3.</span> <span class="nav-text">VLAN配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#DHCP-%E9%85%8D%E7%BD%AE%E4%BD%BF%E7%94%A8"><span class="nav-number">2.4.</span> <span class="nav-text">DHCP 配置使用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%96%B9%E6%B3%95%E4%B8%80-%E5%85%A8%E5%B1%80%E5%BB%BA%E7%AB%8B%E5%9C%B0%E5%9D%80%E6%B1%A0"><span class="nav-number">2.4.1.</span> <span class="nav-text">方法一 全局建立地址池</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%96%B9%E6%B3%95%E4%BA%8C-%E5%9F%BA%E4%BA%8E%E6%8E%A5%E5%8F%A3%E7%9A%84DHCP-%E7%AE%80%E5%8D%95-%E4%BE%BF%E6%8D%B7"><span class="nav-number">2.4.2.</span> <span class="nav-text">方法二  基于接口的DHCP(简单,便捷)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%96%B9%E6%B3%95%E4%B8%89-DHCP-relay-dhcp%E4%B8%AD%E7%BB%A7"><span class="nav-number">2.4.3.</span> <span class="nav-text">方法三 DHCP relay (dhcp中继)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#DHCP-SNOOPING"><span class="nav-number">2.5.</span> <span class="nav-text">DHCP SNOOPING</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#BFD"><span class="nav-number">2.6.</span> <span class="nav-text">BFD</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%AB%AF%E5%8F%A3%E5%AE%89%E5%85%A8"><span class="nav-number">2.7.</span> <span class="nav-text">端口安全</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%AB%AF%E5%8F%A3%E9%95%9C%E5%83%8F"><span class="nav-number">2.8.</span> <span class="nav-text">端口镜像</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#vlan%E9%AB%98%E7%BA%A7%E9%85%8D%E7%BD%AE"><span class="nav-number">2.9.</span> <span class="nav-text">vlan高级配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%A0%B9%E6%8D%AEmac%E5%9C%B0%E5%9D%80%E5%88%92%E5%88%86vlan"><span class="nav-number">2.9.1.</span> <span class="nav-text">根据mac地址划分vlan</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%A0%B9%E6%8D%AEip%E5%9C%B0%E5%9D%80%E5%88%92%E5%88%86vlan"><span class="nav-number">2.9.2.</span> <span class="nav-text">根据ip地址划分vlan</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#super-vlan"><span class="nav-number">2.9.3.</span> <span class="nav-text">super vlan</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="王增明"
      src="/images/avatar.jpeg">
  <p class="site-author-name" itemprop="name">王增明</p>
  <div class="site-description" itemprop="description">喜欢折腾的极客聚集地.</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">23</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">6</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">18</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL3dhbnplbmdtaW5n" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;wanzengming"><i class="fab fa-github fa-fw"></i>GitHub</span>
      </span>
      <span class="links-of-author-item">
        <a href="/wangzengming@aliyun.com" title="E-Mail → wangzengming@aliyun.com"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">王增明</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
      <span class="post-meta-item-text">站点总字数：</span>
    <span title="站点总字数">342k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span class="post-meta-item-text">站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">5:11</span>
</div>

        
<div class="busuanzi-count">
  <script data-pjax async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/pjax/pjax.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>

<script src="/js/bookmark.js"></script>

  <script>
var pjax = new Pjax({
  selectors: [
    'head title',
    '#page-configurations',
    '.content-wrap',
    '.post-toc-wrap',
    '.languages',
    '#pjax'
  ],
  switches: {
    '.post-toc-wrap': Pjax.switches.innerHTML
  },
  analytics: false,
  cacheBust: false,
  scrollTo : !CONFIG.bookmark.enable
});

window.addEventListener('pjax:success', () => {
  document.querySelectorAll('script[data-pjax], script#page-configurations, #pjax script').forEach(element => {
    var code = element.text || element.textContent || element.innerHTML || '';
    var parent = element.parentNode;
    parent.removeChild(element);
    var script = document.createElement('script');
    if (element.id) {
      script.id = element.id;
    }
    if (element.className) {
      script.className = element.className;
    }
    if (element.type) {
      script.type = element.type;
    }
    if (element.src) {
      script.src = element.src;
      // Force synchronous loading of peripheral JS.
      script.async = false;
    }
    if (element.dataset.pjax !== undefined) {
      script.dataset.pjax = '';
    }
    if (code !== '') {
      script.appendChild(document.createTextNode(code));
    }
    parent.appendChild(script);
  });
  NexT.boot.refresh();
  // Define Motion Sequence & Bootstrap Motion.
  if (CONFIG.motion.enable) {
    NexT.motion.integrator
      .init()
      .add(NexT.motion.middleWares.subMenu)
      .add(NexT.motion.middleWares.postList)
      .bootstrap();
  }
  NexT.utils.updateSidebarPosition();
});
</script>


  <script defer src="/lib/three/three.min.js"></script>
    <script defer src="/lib/three/three-waves.min.js"></script>
    <script defer src="/lib/three/canvas_lines.min.js"></script>
    <script defer src="/lib/three/canvas_sphere.min.js"></script>


  
  <script data-pjax>
    (function(){
      var canonicalURL, curProtocol;
      //Get the <link> tag
      var x=document.getElementsByTagName("link");
		//Find the last canonical URL
		if(x.length > 0){
			for (i=0;i<x.length;i++){
				if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
					canonicalURL=x[i].href;
				}
			}
		}
    //Get protocol
	    if (!canonicalURL){
	    	curProtocol = window.location.protocol.split(':')[0];
	    }
	    else{
	    	curProtocol = canonicalURL.split(':')[0];
	    }
      //Get current URL if the canonical URL does not exist
	    if (!canonicalURL) canonicalURL = window.location.href;
	    //Assign script content. Replace current URL with the canonical URL
      !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
  </script>




  
<script src="/js/local-search.js"></script>











<script data-pjax>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js', () => {
    mermaid.initialize({
      theme    : 'forest',
      logLevel : 3,
      flowchart: { curve     : 'linear' },
      gantt    : { axisFormat: '%m/%d/%Y' },
      sequence : { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>


    <div id="pjax">
  

  

    </div>
<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","model":{"jsonPath":"/live2dw/assets/hijiki.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":false},"react":{"opacityDefault":1,"opacityOnHover":1},"log":false,"tagMode":false});</script></body>
</html>
<script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script>
